<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/8/28
 * Time: 18:09
 */
header("Access-Control-Allow-Origin:*");
header('Access-Control-Allow-Methods:POST,GET');
header('Access-Control-Allow-Headers:x-requested-with,content-type');
require_once ('dbServerConnect.php');
$con = new DB();
$link = $con->mySqlServer();
if(!$link) {
    echo "mysql connect fail";
    return;
}

$sql = "select distinct tag from blog_container order by tag";
$result = mysqli_query($link,$sql) or die(mysqli_error($link));
$res = mysqli_fetch_all($result);

if(!$res) {
    echo 0;
    return;
}
echo json_encode($res);

